﻿package  core.net.socket.cmd {
	
	import core.net.socket.SocketCmd;
	import com.adobe.serialization.json.JSON;
	
	public class BluetoothBindCmd implements SocketCmd {

		public static var COMMAND_ID:String = "CMD_BLUETOOTH_BIND";
		public var address:String;
		public var teacherId:String;
		public function BluetoothBindCmd() {
			
		} 
		public static function make(address:String,teacherId:String):SocketCmd{
			var cmd:BluetoothBindCmd = new BluetoothBindCmd();
			cmd.address = address;
			cmd.teacherId = teacherId;
			return cmd;
		}
		
		public function commandString():String{
			var obj = {
				cmd:COMMAND_ID,
				address:this.address,
				teacherId:this.teacherId
			};
			var str:String = com.adobe.serialization.json.JSON.encode(obj);
			return str;
		}

	}
	
}
